<!DOCTYPE html>

<html lang="fr">
  <head>
	<!-- Metadatas -->
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta charset="UTF-8" />
	<meta name="description" content="Shop your thing gives you some customized products" />
	<meta name="keywords" content="shop, thing, customized, youcommerce" />
	<meta name="author" content="Los Pollos Hermanos" />
	<title>{% block title %}Shop your Thing{% endblock %}</title>
 
	{% block css %}
	<!-- Styles -->
	<link href="{{ asset('css/bootstrap.css') }}" rel="stylesheet" type='text/css' />
	<link href="{{ asset('css/font-awesome.css') }}" rel="stylesheet" type='text/css' />
	<link href="{{ asset('css/style.css') }}" rel="stylesheet" type='text/css' />
	<link href="{{ asset('css/style-article.css') }}" rel="stylesheet" type='text/css' />
        
        <!-- Font -->
        <link href='http://fonts.googleapis.com/css?family=Mouse+Memoirs' rel='stylesheet' type='text/css'>
        
	<!-- Favicon -->
        <link rel="shortcut icon" type="image/png" href="{{ asset('ico/favicon.png') }}" />
        <style>
            ul.cart li a:hover {
                color: #FFF;
                background-color: #428BCA;
                border-color: #357EBD;
            }
        </style>
	{% endblock %}
	
  </head>
  <body>
  
	<!-- Header -->
	<section id="header">
		<nav class="navbar navbar-default" role="navigation">
		
		  <div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
			  <span class="sr-only">Toggle navigation</span>
			  <span class="icon-bar"></span>
			  <span class="icon-bar"></span>
			  <span class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="{{ path('y_commerce_global_index') }}"><img src="{{ asset('img/logo.png') }}" alt="Shot your Thing" title="Shot your Thing" /></a>
		  </div>
                    
		  {% if app.user %}
                    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
			<ul class="nav navbar-nav">
			  <li {% if activeMenuItem == 1 %}class="active"{% endif %}><a href="{{ path('y_commerce_global_index') }}"><i class="icon-home"></i> Accueil</a></li>
			  <li {% if activeMenuItem == 2 %}class="active"{% endif %}><a href="{{ path('y_commerce_global_produits') }}"><i class="icon-gift"></i> Vos produits</a></li>
			  <li {% if activeMenuItem == 3 %}class="active"{% endif %}><a href="{{ path('y_commerce_global_user_edit', {'id': app.user.id}) }}"><i class="icon-user"></i> Profil</a></li>
                          <li><a href="{{ path('sonata_user_admin_security_logout') }}"><i class="icon-signout"></i> Déconnexion</a></li>
                          {% if is_granted('ROLE_SUPER_ADMIN') %}
                              <li><a href="{{ path('sonata_admin_dashboard') }}"><i class="icon-cogs"></i> Administration</a></li>
                          {% endif %}
			</ul>
                        <ul class="nav navbar-left cart">
                          <li {% if activeMenuItem == 5 %}class="active"{% endif %}><a href="{{ path('y_commerce_global_cart') }}" class="btn {% if activeMenuItem == 5 %}btn-primary{% else %}btn-default{% endif %}"><i class="icon-shopping-cart"></i> Votre panier</a></li>
                        </ul>
		  </div><!-- /.navbar-collapse -->
                  {% else %}
		  <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
			<ul class="nav navbar-nav">
			  <li {% if activeMenuItem == 1 %}class="active"{% endif %}><a href="{{ path('y_commerce_global_index') }}"><i class="icon-home"></i> Accueil</a></li>
			  <li {% if activeMenuItem == 2 %}class="active"{% endif %}><a href="{{ path('y_commerce_global_produits') }}"><i class="icon-gift"></i> Les produits</a></li>
                          <li {% if activeMenuItem == 4 %}class="active"{% endif %}><a href="{{ path('y_commerce_global_user_subscribe') }}"><i class="icon-signin"></i> Inscription</a></li>
			  <li><a href="{{ path('sonata_user_admin_security_login') }}"><i class="icon-user"></i> Connexion</a></li>
			</ul>
		  </div><!-- /.navbar-collapse -->
                  {% endif %}
		</nav>
                <div class="header">
                </div>
	</section>
	
	<!-- Notifications -->
	{% block notification %}
		<section id="notification" class="container">
		
		{% for flashMessage in app.session.flashbag.get('success') %}
				<div class="alert alert-success">
					 <button type="button" class="close" data-dismiss="alert">&times;</button>
						<strong>Félicitations:</strong> {{ flashMessage|raw }}
				</div>
		{% endfor %}
		
		{% for flashMessage in app.session.flashbag.get('notice') %}
				<div class="alert alert-warning">
					 <button type="button" class="close" data-dismiss="alert">&times;</button>
						<strong>Attention:</strong> {{ flashMessage|raw }}
				</div>
		{% endfor %}
		
		{% for flashMessage in app.session.flashbag.get('error') %}
				<div class="alert alert-danger">
						<button type="button" class="close" data-dismiss="alert">&times;</button>
						<strong>Erreur:</strong> {{ flashMessage|raw }}
				</div>
		{% endfor %}
		
		{% for flashMessage in app.session.flashbag.get('info') %}
				<div class="alert alert-info">
					 <button type="button" class="close" data-dismiss="alert">&times;</button>
						<strong>Information:</strong> {{ flashMessage|raw }}
				</div>
		{% endfor %}
		
		</section>
	{% endblock %}
	
	<!-- Contenu du site -->
        <section class="container" id="corps">
            {% block content %}
            {% endblock %}
	</section>

	<!-- Footer -->
	<section id="footer">
            <div class="container">
                {% if app.user %}
                    <strong>&copy; 2013 - Shop your Thing</strong> | <a href="{{ path('y_commerce_global_user_edit', {'id': app.user.id}) }}">Votre profil</a> |  <a href="{{ path('y_commerce_global_produits') }}">Acheter des produits</a> | Propusé par <em>Symfony2</em>
                {% else %}
                     <strong>&copy; 2013 - Shop your Thing</strong> | <a href="{{ path('y_commerce_global_user_subscribe') }}">Inscription</a> | <a href="{{ path('sonata_user_admin_security_login') }}">Se connecter</a> |  <a href="{{ path('y_commerce_global_produits') }}">Acheter des produits</a> | Propusé par <em>Symfony2</em>
                {% endif %}
            </div>
	</section>
        
    <!-- Bootstrap & JQuery -->
	<script type="text/javascript" src="{{ asset('js/jquery.min.js') }}"></script>  
	<script type="text/javascript" src="{{ asset('js/bootstrap.js') }}"></script>
	{% block js %}
	<!-- Main script -->
	<script type="text/javascript" src="{{ asset('js/main.js') }}"></script>
	{% endblock %}

  </body>
</html>

	
	